#ifndef SCENEMANAGER_HEADER
#define SCENEMANAGER_HEADER

#include "../Entities/AbstractClasses/GameEntity.h"
#include "../Scene/SceneNode.h"
#include "../Camera.h"

class SceneManager {
public:
	static SceneManager * Instance();	//The public function to access the singleton
	static void destroy();				//For destruction
	static void create();				//For creation
	
	Camera * getCamara() const;		//Get the camera
	void setCamera(Camera *);			//Set the camera

	SceneNode * getRootSceneNode() const;//Get the scene node at the root of the scene graph
	GameEntity * getEntity(const std::string&) const;//Get the entity from its name

	void updateScene();					//Update the entire scene
	void renderScene();					//Render the entire scene
	void clearScene();					//Empty the entire scene (nodes, camera and lights)

protected:
	SceneManager();						//Constructor
	~SceneManager();					//Destructor
	static SceneManager* _instance;		//The one instance

	SceneNode *_rootSceneNode;			//The root scene node
	Camera * _camera;					//The camera
};

#endif